package com.hujun.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IndexController {

	private Logger logger = LoggerFactory.getLogger(getClass());

	@Value("${server.port:}")
	private Integer port;

	@RequestMapping({"/", "index", "index.html"})
	public String index() {
		logger.info("访问了端口号为{}的服务", port);
		return "hello 当前项目端口 => " + port;
	}
	
}
